<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of IndexController
 *
 * @author Sorasak Siangsanan
 */
class IndexController extends Controller {

    public function actionIndex() {
        if (!Yii::app()->user->isGuest && Yii::app()->user->id == SpecialUser::MASTER_ID) {
            $this->redirect(array('master/index'));
        }
        if (!Yii::app()->user->isGuest && Yii::app()->user->id == SpecialUser::ADMIN_ID) {
            $this->redirect(array('admin/index'));
        }
        
        $this->render('index');
    }

}
